package com.xyht.sca_s.student_manage_system.modules.bigData.controller;


import com.xyht.sca_s.student_manage_system.common.commonReturn.ResponseResult;
import com.xyht.sca_s.student_manage_system.common.desEncodeAndDecode.annotation.SecretBody;
import com.xyht.sca_s.student_manage_system.modules.bigData.service.SmsBasicInformationService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * <p>
 *  大数据驾驶舱-校园总览-基础信息 前端控制器
 * </p>
 *
 * @author XYHT
 * @since 2023-08-31
 */
@RestController
@RequestMapping("/bigData/basicInfo")
@SecretBody
public class SmsBasicInfoController {

    @Resource
    private SmsBasicInformationService smsBasicInformationService;

    @ApiModelProperty("校园简介+年级概况+教师风采")
    @GetMapping("/getBasicInformation")
    public ResponseResult getBasicInformation(){
        return smsBasicInformationService.getBasicInformation();
    }

    @ApiModelProperty("师生概况")
    @GetMapping("/getTeachersOverview")
    public ResponseResult getTeachersOverview(@RequestParam(value = "beginTimeStr",required = false) String beginTimeStr,
                                              @RequestParam(value = "endTimeStr",required = false) String endTimeStr){
        return smsBasicInformationService.getTeachersOverview(beginTimeStr,endTimeStr);
    }


    @ApiModelProperty("师生占比")
    @GetMapping("/getTeachersRatio")
    public ResponseResult getTeachersRatio( @RequestParam(value = "thisYear",required = false) String thisYear){
        return smsBasicInformationService.getTeachersRatio(thisYear);
    }

    @ApiModelProperty("专业概况")
    @GetMapping("/getProfessionalOverview")
    public ResponseResult getProfessionalOverview(@RequestParam(value = "beginTimeStr",required = false) String beginTimeStr
                                                  //@RequestParam(value = "endTimeStr",required = false) String endTimeStr
                                                  //@RequestParam(value = "professional",required = false) String professional
                                                  ){
        return smsBasicInformationService.getProfessionalOverview(beginTimeStr);
    }

    @ApiModelProperty("查看专业")
    @GetMapping("/getProfessional")
    public ResponseResult getProfessional(){
        return smsBasicInformationService.getProfessional();
    }

    @ApiModelProperty("各院系教师职称人数")
    @GetMapping("/getTchTitleSum")
    public ResponseResult getTchTitleSum(){
        return smsBasicInformationService.getTchTitleSum();
    }


    @ApiModelProperty("展示男女比例")
    @GetMapping("/getBoyAndGirlRation")
    public ResponseResult getBoyAndGirlRation(){
        return smsBasicInformationService.getBoyAndGirlRation();
    }





}

